
import Vue from 'vue'
var mixins = {
	methods: {
		operatorConfirm(action,text){
            this.$confirm(`您是否要${text}`, '提示', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                type: 'warning'
            }).then(()=>{
                this.$message({
                    type: 'success',
                    message: `${text}成功`
                })
                action();
            }).catch(()=>{
                this.$message({
                    type:'info',
                    message: `取消${text}`
                })
            })
        },
        pushToView(item,query,params){
            this.$router.push({name:item.name,path:item.path,query:query,params:params})
        }
	}
}
//注册全局mixins
Vue.mixin(mixins);
//导出一个对象
export default {}
